package domains

import (
	"context"

	"gitee.com/djaf/my-certs/app/data/dxo"
	"gitee.com/djaf/my-certs/app/web/dto"
)

// Service : Service for Domains
type Service interface {
	Insert(ctx context.Context, item *dto.Domain) (*dto.Domain, error)

	Update(ctx context.Context, id dxo.DomainID, item *dto.Domain) (*dto.Domain, error)

	Remove(ctx context.Context, id dxo.DomainID) error

	Find(ctx context.Context, id dxo.DomainID) (*dto.Domain, error)

	FindByName(ctx context.Context, name dxo.DomainName) (*dto.Domain, error)

	List(ctx context.Context) ([]*dto.Domain, error)
}
